package com.xg.service;

import com.xg.common.request.BrandReq;
import com.xg.common.response.UsedCarBrand;
import com.xg.common.result.ApiResult;
import com.xg.common.util.PageUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "service-car-provider")
public interface BrandService {

    @RequestMapping("/brand/list")
    ApiResult<List<UsedCarBrand>> findCarBrandList();

    @RequestMapping("/brand/queryPageList")
    ApiResult<PageUtil<UsedCarBrand>> queryPageList(@RequestBody BrandReq brandReq);

    @RequestMapping("/brand/delete")
    ApiResult deleteBrands(@RequestParam("ids") List<Integer> ids);

    @RequestMapping("/brand/info")
    ApiResult<UsedCarBrand> selectBrandInfo(@RequestParam("id") Integer bannerId);

    @RequestMapping("/brand/save")
    ApiResult saveBrand(@RequestBody UsedCarBrand usedCarBrand);
}
